Solan reference
CLI, REPL, and Package Commands
A reference for running files and snippets, REPL, syntax checks, formatting, LSP/debug tools, permission flags, package commands, and exit codes.
Running programs
Files, inline code, and the REPL
| Command | Behavior |
|---|---|
solan file.سو [args...] | Runs a file; arguments are exposed in the global وسائط. README lists .سو, .an, and .solan extensions. |
solan -e "code" | Executes inline source from the terminal. |
solan | Starts the REPL; prints expression results, supports multiline input, and uses history when readline is available. Exit with خروج, exit, or Ctrl+D. |
#!/usr/bin/env solan | May appear at the start of a file to run it as a script when executable permissions are set. |
solan file.سو
solan -e 'اطبع(1 + 2)'
solanDeveloper tools
Checks, formatting, debugging, and language server
| Command | Behavior |
|---|---|
solan --check file.سو | Checks syntax without running; prints success or an error. |
solan fmt file.سو [-w] | Formats indentation, whitespace, and blank lines; -w writes to the file, otherwise prints output. |
solan fmt file.سو --قياسي [-w] | Normalizes keyword aliases to canonical keywords. |
solan --لون file.سو / --html | Syntax colors in terminal or generated HTML. |
solan --تتبع file.سو | Prints executed source lines. |
solan --تصحيح file.سو [--نقطة N] | Interactive step-by-step debugger with an optional breakpoint. |
solan --ops file.سو | Displays internal bytecode instructions for developers. |
solan lsp | Starts the stdio LSP server; source advertises completion, hover, definition, document symbols, and syntax diagnostics. |
Global options
Permissions, limits, and colors
| Option | Purpose |
|---|---|
--اسمح=class,... / --امنع=class,... | Grants or denies permission classes; see the security page for scope details. |
--اسمح-قراءة=path / --اسمح-كتابة=path / --اسمح-شبكة=host | Scopes file read/write or network access. |
--آمن | Safe mode; README describes it as read and environment only. |
--حد_وقت N / --حد_ذاكرة N | Time limit in seconds and memory limit in MiB. |
--بلا_لون | Disables terminal colors. |
| English aliases | --trace, --debug, --safe, --allow, --deny, --timeout, --max-mem, --no-color, --break, --color. |
Package manager
Package commands
| Command | Documented use |
|---|---|
solan init [--lib] | Creates solan.json; --lib creates a library scaffold. |
solan add [name=]source[@range] | Adds and installs a dependency; --as name is an alternative naming form. |
solan install [--local] [--quiet] | Installs project manifest dependencies; optionally prefers local store. |
solan install --frozen | Uses the lock without upgrades and checks content hashes. |
solan remove name... / solan update [name] [--major] | Removes or updates dependencies within ranges. |
solan list [--tree] [--store] | Lists dependencies, their tree, or the package store. |
solan outdated / why name / verify | Checks versions, dependency provenance, or lock integrity. |
solan prune [--dry-run] / cache clean | Cleans unused shared-store packages or temporary downloads. |
solan publish [--dry-run] [--push] | Checks a library and creates a release tag; --push pushes it. |
Arabic command names include ثبت, اضف, ازل, قائمة, حدث, تحقق, قديمة, لماذا, تنظيف, كاش, انشر, and بدء. See the standard-library page for lock/store constraints.
Execution
Exit codes and installation page
| Code | Meaning |
|---|---|
0 | Success. |
65 | Syntax error. |
66 | Could not open file. |
70 | Uncaught runtime error. |
64 | Invalid permission option. |
Current Linux/macOS/Windows installation instructions and build prerequisites remain at /install; they are intentionally not duplicated here.
Source files
Direct links pinned to the source snapshot used by this reference; the main branch may change later.