Metadata-Version: 2.4
Name: themis-cli
Version: 0.3.0
Summary: A CLI tool to manage AI-assisted project workflows
Author-email: Miguel Plazas <devops@miguelplazasr.com>
Requires-Python: >=3.12
Requires-Dist: click>=8.1.0
Requires-Dist: rich>=13.0.0
Description-Content-Type: text/markdown

# Themis CLI

A CLI tool to manage the full lifecycle of AI-assisted development projects.

Themis solves context loss between Claude Code sessions by generating structured
project scaffolding with `CLAUDE.md`, `BACKLOG.md`, `decisions/`, and a
whitepaper — keeping all context, decisions, and documentation in one place.

## Why Themis?

When working with Claude Code, valuable research and architectural decisions
get lost in chat history between sessions. Themis gives every idea and project
a structured home where context is preserved and travels with the code.

## Installation

Requires Python 3.12+ and [uv](https://docs.astral.sh/uv/).

```bash
uv tool install themis-cli
```

Verify:

```bash
themis --version
```

## Configuration

### Workspace path

By default Themis uses `~/themis-workspace/`. Override via:

```bash
themis config set workspace /path/to/your/workspace
```

Configuration is stored in `~/.config/themis/config.json`.

### Developer profile

Themis injects your developer profile into every generated `CLAUDE.md` so
Claude Code always knows who you are and how you work.

```bash
themis setup
```

This creates `~/.config/themis/profile.md`. Edit it to describe your stack,
principles, and working preferences.

## Workspace Structure

```text
~/themis-workspace/
├── inbox/              # Ideas under exploration
│   └── my-idea/
│       ├── CLAUDE.md
│       ├── EXPLORATIONS_LOG.md
│       └── decisions/
└── projects/           # Active projects
    └── lib-py-myproject/
        ├── CLAUDE.md
        ├── CONTEXT.md
        ├── BACKLOG.md
        ├── WHITEPAPER.md
        ├── .gitignore
        └── decisions/
            └── DECISION-MODEL.md
```

## Commands

### `themis init-idea <name>`

Creates a new idea in `inbox/` with a structured `CLAUDE.md`,
`EXPLORATIONS_LOG.md`, and `decisions/` folder. Injects your developer
profile and prints the correct `agora` launch command.

```bash
themis init-idea my-saas-idea
```

### `themis init-project <name> [stack]`

Creates a fully initialized project with native tooling, `CLAUDE.md`,
`BACKLOG.md`, `WHITEPAPER.md`, `.gitignore`, and a first Git commit.
Prompts for project type to build the correct repository name.

**Supported stacks:** `python`, `angular`, `nextjs`, `node`, `nestjs`

**Project types:** `src`, `lib`, `util`, `msvc`, `proj`

The project directory is named following the convention:
`<type>-<lang>-<name>` (e.g. `lib-py-myproject`, `src-ts-myapp`).

```bash
themis init-project myproject python
# or let Themis prompt you
themis init-project myproject
```

### `themis promote <name> [stack]`

Promotes an idea from `inbox/` to a full project. Migrates research context
and decisions, prompts for whitepaper content, and removes the idea from
`inbox/` after migration.

```bash
themis promote my-saas-idea python
```

### `themis list`

Lists all ideas and projects in your workspace. For each project shows the
current **In Progress** items from `BACKLOG.md` and the **Next** step from
the last session in `CLAUDE.md`.

```bash
themis list
```

```
          Themis Workspace
┌─────────────┬──────────────────┬──────────────┬───────────────┐
│ Type        │ Name             │ In Progress  │ Next          │
├─────────────┼──────────────────┼──────────────┼───────────────┤
│ 💡 idea     │ my-saas-idea     │              │               │
│ 🚀 project  │ lib-py-myproject │ • Fix auth   │ Add dashboard │
└─────────────┴──────────────────┴──────────────┴───────────────┘
```

### `themis status`

Quick consolidated view of all active projects showing current **In Progress**
items and next steps — without listing ideas.

```bash
themis status
```

```
              Project Status
┌──────────────────┬──────────────┬───────────────┐
│ Project          │ In Progress  │ Next          │
├──────────────────┼──────────────┼───────────────┤
│ lib-py-myproject │ • Fix auth   │ Add dashboard │
└──────────────────┴──────────────┴───────────────┘
```

### `themis session start <project>`

Launches Claude Code for a project with the correct `CLAUDE_MEM_DATA_DIR`
set automatically. Accepts the full project name or just the short name.

```bash
themis session start myproject
# or
themis session start lib-py-myproject
```

```
  ⬡ THEMIS SESSION START

  Proyecto : lib-py-myproject
  Memoria  : /home/user/.claude-mem/lib-py-myproject
```

### `themis config`

Manage Themis configuration (workspace path).

```bash
themis config show
themis config set workspace ~/projects/ai-workspace
```

### `themis setup`

Interactive setup: creates `~/.config/themis/profile.md` with your developer
profile content.

```bash
themis setup
```

## Typical Workflow

```
1. Got an idea?
   themis init-idea my-idea
   cd ~/themis-workspace/inbox/my-idea && agora

2. Research and explore with Claude.
   Document decisions in decisions/

3. Ready to build?
   themis promote my-idea python

4. Open your project.
   themis session start my-idea

5. Track progress.
   themis status
```

## Requirements

- Python 3.12+
- [uv](https://docs.astral.sh/uv/) — for Python projects
- [pnpm](https://pnpm.io/) — for `nextjs` and `node` projects
- [Angular CLI](https://angular.io/cli) — for `angular` projects
- [Claude Code](https://claude.ai/code) — for `themis session start`

## License

MIT
