Skip to content

New alproject CLI #55

Description

@paleo

Our OpenClaw developer needs a new CLI in a new alproject package.

Project discovery and configuration

The CLI manages a project registry and discovers unregistered projects on the file system.

  • Read configuration from ~/.alproject.json. The CLI must never modify this file.
  • The configuration defines the primary project root (most of our consumer will set it to ~/projects/), and the allowed parent directories for projects.
  • Store mutable registry data in <root>/alproject-registry.json, where <root> is the primary project root defined in the configuration.
  • Search each allowed parent directory direct children. A directory containing a .git directory is a project's main worktree. Other directories are listed as additional directories (in the output of the full list of projects), but not scanned neither used.
  • Validate the configuration and registry data with ArkType.

Commands

The user can list all projects. For each project, display:

  • Its name, derived from the directory name of the main worktree.
  • The absolute path to its parent directory.
  • The names of its workspace directories.
  • Any discrepancy between the registry and the file system:
    • The project exists on the file system but is absent from the registry.
    • The project exists in the registry but is absent from the file system.

The user can register and unregister projects:

  • A project path may be absolute or relative to the primary project root.
  • Registration may allocate a port range. Unregistration releases it.
  • The user specifies the number of ports required per workspace and the maximum number of workspaces. The CLI manages the port registry and returns the allocated base port.

The CLI must follow the conventions used by the other CLIs in this repository.

The --guide option provides complete documentation. The guide combines:

  • Generic CLI documentation.
  • Project-specific documentation from an optional, read-only Markdown file at ~/projects/alproject-guide.md.

We also need --help and -v/--version parameters.

Playbook changes

Update the playbook skill as follows:

  • Do not assume that projects are located in ~/projects/. Always use the appropriate alproject command to list projects and their paths. Document that command in the skill.
  • Add a section about creating and removing projects. It must instruct the agent to read the output of alproject --guide first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions