interactive
1.5.0, released 8 weeks ago by cjycode.com
Interactive Dart REPL with hot reload and full grammar support
What it does
Provides a command‑line REPL for Dart that lets you import packages, define code, and hot‑reload changes while preserving state. It evaluates expressions, statements, functions, and classes in an isolated workspace.
AI-written summary of version 1.5.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a quick interactive shell for Dart debugging or experimentation
- You want to test code snippets without creating a full project
- You want to experiment with third‑party packages on the fly
Skip it when
- You are building a production app that requires a stable runtime
- You need a library to be imported into other Dart code
Strengths
- Full Dart grammar support
- Hot reload preserves state across edits
- Easy addition of third‑party packages via !dart pub add
- Works on all platforms supported by Dart
Weaknesses
- Not a library, only a CLI tool
- Limited to command‑line usage
- Requires Dart SDK installed
- No IDE integration out of the box
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 9
Run `dart install interactive` or `dart run interactive@`
```dart
$ interactive
>>> import 'package:path/path.dart';
>>> join('dir', 'file.txt')
'dir/file.txt'
```Works with
Packages commonly used together with interactive: ones it builds on, ones built on it, and its own family.
- vm_serviceinteractive depends on itA library to communicate with a service implementing the Dart VM service protocol.
- analyzerinteractive depends on itPerforms static analysis of Dart code for tool integration and embedding.
- pub_semverinteractive depends on itVersions and version constraints implementing pub's versioning policy.
- argsinteractive depends on itLibrary for parsing raw command-line arguments into options and values using GNU and POSIX styles.
- logginginteractive depends on itProvides configurable logging with levels and stream listeners for Dart apps.
- cli_utilinteractive depends on itUtilities to help build Dart command-line apps, find the SDK, and display progress.