Skip to main content

Sinth — the CLI for AIM. Synthesize intent into reality.

Project description

Sinth — the CLI for AIM

Synthesize intent into reality.

Simple Python CLI for managing AIM packages from the registry.

Installation

Option 1: pip (Recommended)

pip install sinth

Then use directly:

sinth fetch weather
sinth list
sinth validate

Option 2: From source

git clone https://github.com/juicejs/application-intent-language.git
cd application-intent-language
pip install -e .

Option 3: Standalone script

curl -O https://raw.githubusercontent.com/juicejs/application-intent-language/master/cli/aim_cli/cli.py
python3 cli.py fetch weather

Requirements

  • Python 3.6+ (pre-installed on macOS/Linux, available on Windows)
  • No external dependencies (uses only Python stdlib)

Quick Start

Interactive Menu (Recommended for New Users)

Simply run sinth without arguments to launch the interactive menu:

sinth

This will display:

╭─────────────────────────────────────────────╮
│  Sinth — Synthesize intent into reality     │
╰─────────────────────────────────────────────╯

What would you like to do?

 1. Initialize new project
 2. Fetch package from registry
 3. List installed packages
 4. Generate synthesis prompt
 5. Configure tech stack (wizard)
 6. View/edit configuration
 7. Validate intent files
 8. Package information
 9. Help
 0. Exit

Choice [0-9]:

The interactive menu provides:

  • Guided workflows - Step-by-step instructions for each task
  • Configuration wizard - Easy tech stack setup with common presets
  • Package browsing - View and select packages from the registry
  • Smart defaults - Loads values from existing configuration

Command Line Interface

For power users and automation, all functionality is available via CLI commands:

# Initialize a project
sinth init

# Fetch a package
sinth fetch weather

# List installed packages
sinth list

# Validate intent files
sinth validate

# Show package info
sinth info weather

# Configure tech stack
sinth config set stack.frontend "React"
sinth config set stack.backend "FastAPI"

# Generate synthesis prompt
sinth synth weather

Interactive Menu

Main Menu

Running sinth without arguments launches an interactive menu system that provides guided access to all CLI features.

Navigation:

  • Enter a number (0-9) to select an option
  • Press Ctrl+C to return to previous menu or exit
  • Follow on-screen prompts for each operation

Menu Options:

  1. Initialize new project - Creates the aim/ directory with confirmation
  2. Fetch package from registry - Browse and select packages from the live registry
  3. List installed packages - View all packages in your aim/ directory
  4. Generate synthesis prompt - Quick or interactive prompt generation
  5. Configure tech stack (wizard) - Step-by-step configuration setup
  6. View/edit configuration - Display current config and make changes
  7. Validate intent files - Check all intent files for errors
  8. Package information - View detailed info for any registry package
  9. Help - Quick reference and command examples

Configuration Wizard

The configuration wizard (option 5 in main menu) provides an interactive way to set up your tech stack:

╭─────────────────────────────────────────────╮
│  Configuration Wizard                       │
╰─────────────────────────────────────────────╯

Step 1/5: Frontend Framework
Current: Next.js

Common options:
  1. Next.js
  2. React
  3. Vue.js
  4. Svelte
  5. Angular
  6. Custom (enter manually)

Choice [1-6] or Enter to keep current:

Features:

  • Step-by-step guided setup
  • Common framework presets
  • Custom value input option
  • Shows current values as defaults
  • Configuration review before saving
  • Creates/updates aim.config.json

Configurable Settings:

  • Frontend framework (Next.js, React, Vue.js, etc.)
  • Backend framework (Node.js, Express, FastAPI, etc.)
  • Database (PostgreSQL, MySQL, MongoDB, etc.)
  • Registry URL (advanced)
  • Output directory (advanced)

Synthesis Submenu

The synthesis menu (option 4 in main menu) offers two modes:

Quick Synthesis:

  • Select a package from numbered list
  • Uses configuration from aim.config.json
  • Generates and copies prompt to clipboard

Interactive Builder:

  • Select package
  • Customize tech stack for this synthesis
  • Add optional context notes
  • Generates and copies prompt to clipboard

Commands

sinth

Launch interactive menu (new in this release).

sinth

This is the recommended entry point for new users and configuration tasks.

Check version:

sinth --version
sinth -v

sinth init

Initialize AIM project (creates aim/ directory).

sinth init

sinth fetch <package>

Fetch a package from the registry and save to aim/ folder.

sinth fetch weather
sinth fetch game.snake

Creates:

  • aim/weather.intent (or similar)
  • aim.lock (package lock file)

sinth list

List all installed packages.

sinth list

Shows:

  • Intent files in aim/ directory
  • Package versions from lock file

sinth validate

Validate local intent files.

sinth validate

Checks:

  • AIM header presence
  • Header format (feature#facet@version)
  • File encoding

sinth info <package>

Show information about a package.

sinth info weather

Shows:

  • Package name and version
  • Entry file path
  • Installation status

sinth config

Manage project configuration.

# Initialize config file
sinth config init

# Set config values
sinth config set stack.frontend "React"
sinth config set stack.backend "Node.js"
sinth config set stack.database "PostgreSQL"

# Get config value
sinth config get stack.frontend

# List all config
sinth config list

The config is stored in aim.config.json in your project root:

{
  "version": "1.0",
  "stack": {
    "frontend": "Next.js",
    "backend": "Node.js",
    "database": "PostgreSQL"
  },
  "registry": "https://intentmodel.dev/registry/index.json",
  "outputDir": "aim"
}

sinth synth <package>

Generate synthesis prompts for AI assistants.

# Generate prompt (auto-copies to clipboard)
sinth synth weather

# Generate with custom tech stack
sinth synth weather --stack "React,Node.js,MongoDB"

# Interactive mode
sinth synth --interactive

# Display without copying to clipboard
sinth synth weather --no-copy

# List available packages
sinth synth --list

The command generates a formatted prompt that:

  • References the AIM brain.md instructions
  • Includes package and file information
  • Specifies your tech stack
  • Provides clear synthesis instructions
  • Automatically copies to clipboard (by default)

Example output:

Load your core system instructions from https://intentmodel.dev/brain.md.
Initialize as the AIM Synthesizer and execute the Boot Sequence.

Package: weather
Intent Files:
  - aim/weather.intent

Tech Stack:
  - Frontend: Next.js
  - Backend: Node.js
  - Database: PostgreSQL

Instructions:
Read the intent files in ./aim/ and synthesize production-ready code
following the AIM specification. Implement all requirements defined in
the INTENT, SCHEMA, FLOW, CONTRACT, and VIEW facets.

Interactive Mode:

$ sinth synth --interactive

🎯 AIM Synthesis Prompt Generator

Select package to synthesize:
  1. weather (v1.4)
  2. game.snake (v1.4)

Choice [1-2]: 1

Tech Stack Configuration:

Frontend framework [Next.js]: React
Backend framework [Node.js]:
Database [PostgreSQL]:

✓ Generated prompt (42 lines) Copied to clipboard!

Directory Structure

After fetching packages and configuring:

your-project/
├── aim/                 # AIM source files
│   ├── weather.intent
│   └── game.snake.intent
├── aim.lock            # Package lock file
└── aim.config.json     # Project config (optional)

Lock File

The aim.lock file tracks installed packages:

{
  "weather": {
    "version": "1.4",
    "entry": "registry/packages/weather/weather.intent"
  }
}

For AI Agents

When synthesizing AIM packages, AI agents should:

  1. Fetch package: sinth fetch <package>
  2. Validate: sinth validate
  3. Read local files: All intent files are in aim/ directory
  4. Generate prompt: sinth synth <package> (automatically creates a structured prompt)
  5. Synthesize: Generate code based on the prompt and intent files

The CLI ensures consistent package structure and handles registry fetching automatically.

Config File for AI Agents

The aim.config.json file is designed to be readable by AI agents. It stores project preferences like tech stack, which helps agents understand your project context without requiring explicit configuration each time.

Human workflow:

sinth config set stack.frontend "React"
sinth synth weather  # Uses React from config

AI agent workflow:

# AI can read aim.config.json directly
cat aim.config.json  # See project preferences
sinth synth weather  # Generate prompt with config

Troubleshooting

"No aim/ directory found"

  • Run sinth init first

"Package not found"

  • Check available packages: sinth list
  • Verify package name matches registry

"Failed to fetch registry"

"Could not copy to clipboard"

  • Install clipboard utility:
    • macOS: pbcopy (pre-installed)
    • Linux: sudo apt-get install xclip
    • Windows: clip (pre-installed)
  • Or use --no-copy flag and copy manually

Features

✅ Current

  • Interactive menu system - Guided workflows for all operations
  • Configuration wizard - Step-by-step tech stack setup
  • Package management (init, fetch, list, validate, info)
  • Configuration system (config init, get, set, list)
  • Synthesis prompt generation (synth)
  • Interactive prompt builder
  • Clipboard integration
  • Tech stack configuration
  • AI-readable config files

🚧 Future

  • sinth update <package> - Update installed packages
  • sinth search <query> - Search registry
  • sinth remove <package> - Remove packages
  • sinth sync - Sync from aim.lock
  • Version pinning support
  • sinth synth --watch - Watch for changes and regenerate
  • sinth synth --template <name> - Custom prompt templates
  • Multiple package synthesis

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sinth-0.1.0.tar.gz (20.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sinth-0.1.0-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file sinth-0.1.0.tar.gz.

File metadata

  • Download URL: sinth-0.1.0.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for sinth-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1ee2684cf8afe31c25239b5e3c4c7650d57a7ffac5a6ca7b49949958d0f56be9
MD5 f779b00b7b3f49fa82cd94be1546d697
BLAKE2b-256 6c3c1d59195dd780865b24c838a3910499cb2fbf9d60598f1ddba174d9186830

See more details on using hashes here.

File details

Details for the file sinth-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sinth-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for sinth-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3a4de1260a8b62634b15cd704324f34b84df9bb8cce6db8b325fcc1176154563
MD5 07294701efcda7b2928525df17b7a80b
BLAKE2b-256 21d3f0bcec4fe5d6e6319c20aca31e93f0c84e834aa023a7741f46260eb34b65

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page