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

CommandBehavior
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.
solanStarts the REPL; prints expression results, supports multiline input, and uses history when readline is available. Exit with خروج, exit, or Ctrl+D.
#!/usr/bin/env solanMay appear at the start of a file to run it as a script when executable permissions are set.
README command shapes (not executed)
solan file.سو
solan -e 'اطبع(1 + 2)'
solan

Developer tools

Checks, formatting, debugging, and language server

CommandBehavior
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.سو / --htmlSyntax 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 lspStarts the stdio LSP server; source advertises completion, hover, definition, document symbols, and syntax diagnostics.

Global options

Permissions, limits, and colors

OptionPurpose
--اسمح=class,... / --امنع=class,...Grants or denies permission classes; see the security page for scope details.
--اسمح-قراءة=path / --اسمح-كتابة=path / --اسمح-شبكة=hostScopes file read/write or network access.
--آمنSafe mode; README describes it as read and environment only.
--حد_وقت N / --حد_ذاكرة NTime 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

CommandDocumented 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 --frozenUses 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 / verifyChecks versions, dependency provenance, or lock integrity.
solan prune [--dry-run] / cache cleanCleans 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

CodeMeaning
0Success.
65Syntax error.
66Could not open file.
70Uncaught runtime error.
64Invalid 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.