Commands Reference

aiscript

Launch an interactive AIScript interactive environment (REPL) where you can test AIScript code snippets and explore language features.

$ aiscript
AI Script REPL v0.1.0
Type '.help' for more information.
>

aiscript new

Create a new AIScript project with a standard directory structure.

$ aiscript new [PROJECT_NAME]

Example:

$ aiscript new test-project
Successfully created new AIScript project: test-project
Project structure:
test-project
├── lib/
├── routes/
│   └── index.ai
└── project.toml


Run `aiscript serve` to start the server.

aiscript serve

Run the AIScript project as a web server.

$ aiscript serve [--port=8000] [--host=0.0.0.0]

Options:

  • --port: Port to listen on (default: 8000)

  • --host: Host to bind to (default: 0.0.0.0)

  • --reload: Run in development mode with hot reloading

aim

The aim (AIScript Manager) is a command-line tool for AIScript, similar to cargo for Rust. It provides a comprehensive set of commands to help you build, test, and deploy web applications quickly.

aim ai Not supported yet

Generate AI applications built in AIScript from a prompt description.

$ aim ai [PROMPT_FILE]

This command analyzes a prompt and generates a complete AIScript application based on the description.

Example:

$ cat prompts.txt
Please write a chatbot app that can answer questions about the
following topics:
- history
- geography

$ aim ai prompts.txt

The generated application will include all necessary files, routes, and AI integration to build the described chatbot.

aim compile Not supported yet

Compile an AIScript project into executable code.

$ aim compile [--release]

Options:

  • --release: Compile in release mode with optimizations

This command validates your code and compiles it to an executable format.

aim deploy Not supported yet

Deploy an AIScript project to the aiscript.dev server.

$ aim deploy [--env=production]

Options:

  • --env: Target environment (default: production)

This command packages your application and deploys it to the AIScript cloud hosting service.

aim debug Not supported yet

Open an interactive, Postman-like debug UI in the browser for testing your API routes.

$ aim debug [--port=8001]

Options:

  • --port: Port to use for the debug UI (default: 8001)

The debug UI automatically imports your API routes, allowing you to test endpoints with different parameters and view responses.

aim fmt Not supported yet

Format AIScript source code according to the language style guidelines.

$ aim fmt [FILES...]

Options:

  • --check: Check if files are formatted without modifying them
  • --all: Format all files in the project

aim lint Not supported yet

Lint AIScript source code to identify potential problems.

$ aim lint [FILES...]

Options:

  • --fix: Automatically fix issues when possible
  • --all: Lint all files in the project

aim migrate Not supported yet

Manage database schema migrations.

aim migrate up

Apply pending migrations to update the database schema.

$ aim migrate up [--steps=N]

Options:

  • --steps: Number of migrations to apply (default: all pending)

aim migrate down

Revert migrations to roll back database schema changes.

$ aim migrate down [--steps=N]

Options:

  • --steps: Number of migrations to revert (default: 1)

aim mock Not supported yet

Generate mock data for development and testing.

$ aim mock [ENTITY] [COUNT]

Example:

$ aim mock users 100

This generates 100 mock user records based on your data models.

aim test Not supported yet

Run tests for an AIScript project.

$ aim test [TEST_PATH]

Options:

  • --watch: Watch for file changes and rerun tests
  • --coverage: Generate test coverage report

aim version

Display the version information for AIScript and its components.

$ aim version

Output example:

AIScript CLI v1.0.0 AIScript Runtime v1.0.0 AIScript Compiler v1.0.0

These commands provide a complete toolkit for AIScript development, from project creation and testing to deployment. The aim command-line interface streamlines the development workflow, making it easy to build, test, and deploy AIScript applications.