Skip to main content

Skelegen is a CLI tool that generates skeleton code for your projects

Project description

skelegen

Skelegen is a CLI tool that generates skeleton code for your projects. Describe what you want to build in natural language; it uses AI to define your project idea, data shapes (DTOs and custom types), and code structure, then writes a Python project with modules, Pydantic models, and function stubs ready for you to implement.

How it works

Skelegen runs a three-step, conversational flow powered by pydantic-ai and Google Gemini:

  1. Project idea — You describe what you want to build. The tool asks follow-up questions until it has a clear title, description, goals, tech stack, and constraints.

  2. DTOs and custom types — From that idea, it proposes Data Transfer Objects (request/response bodies, domain entities, configs) and custom types (enums, type aliases). You can confirm or ask for changes.

  3. Code skeleton — It then proposes a module/script/function layout (packages, files, and function signatures) that use those DTOs and types. Again you confirm or refine.

After you approve each step, Skelegen generates a project directory:

  • A models.py with Pydantic BaseModel DTOs and custom types (enums, Literal, etc.).
  • Packages and scripts — one folder per module, one .py file per script, with function stubs that reference the generated models. Each function has a ... # TODO: implement body so you can fill in logic.

The result is a consistent, type-hinted skeleton you can extend rather than starting from a blank slate.

Requirements

  • Python 3.12+
  • Google API key — Set the GOOGLE_API_KEY environment variable (used for Gemini).

Installation

From the project root (or from PyPI once published):

pip install -e .

Or install in a virtual environment:

python -m venv .venv
.venv\Scripts\activate   # Windows
# source .venv/bin/activate  # macOS/Linux
pip install -e .

Usage

  1. Set your API key:

    set GOOGLE_API_KEY=your_key_here
    
  2. Run the CLI:

    skelegen
    
  3. Follow the prompts:

    • Describe your project (e.g. “A REST API for orders and inventory with auth”).
    • Answer any clarifying questions until the tool shows a ProjectIdeaDefinition; confirm with y if it looks good.
    • Review the proposed DTOs and custom types; confirm or describe changes.
    • Review the proposed code skeleton (modules, scripts, functions); confirm or describe changes.
  4. Skelegen creates a directory named after your project title (e.g. order_api) in the current working directory, containing:

    • models.py — all DTOs and custom types.
    • One subfolder per module (e.g. api/, domain/), each with an __init__.py and script files (e.g. orders.py, auth.py) with stubbed functions.

You can then open the generated project and implement the # TODO sections.

Example

Defining project idea, describe what you want to build...

> You: A small CLI to track daily habits with categories and optional notes.

> Agent: Do you want to persist data (e.g. file or DB) or keep it in memory for now?
> You: SQLite is fine.

> Agent: [outputs ProjectIdeaDefinition]
> Are you okay with this output? (y/n): y

Defining data transfer objects and custom types...
[outputs DtosCustomTypes]
> Are you okay with this output? (y/n): y

Defining code skeleton...
[outputs CodeSkeleton]
> Are you okay with this output? (y/n): y

Project generated successfully.

A new folder (e.g. habit_tracker) will appear with models.py and modules/scripts ready to implement.

License

MIT. See the project license file for details.

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

skelegen-0.1.1.tar.gz (150.2 kB view details)

Uploaded Source

Built Distribution

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

skelegen-0.1.1-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file skelegen-0.1.1.tar.gz.

File metadata

  • Download URL: skelegen-0.1.1.tar.gz
  • Upload date:
  • Size: 150.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for skelegen-0.1.1.tar.gz
Algorithm Hash digest
SHA256 15b1798a9773032c7a622d06714711e0156c9ae0c51c916af7f86c6e15e46352
MD5 005573d1bde22d490918c48803241756
BLAKE2b-256 58ea5a69808ec5c84d08f71d4c5a394fc18eaa976e6452be8348910391294f46

See more details on using hashes here.

File details

Details for the file skelegen-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: skelegen-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for skelegen-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4f55eb51a65233f7a413f18f175a8579805a9cd2a7b3046bfe6be8b92eee1d37
MD5 a995104a4f855b542f5588884c5022aa
BLAKE2b-256 59b7cc66a86534fd02a990a617131d1b33ff2881f25822ecb8cb9d181b418fab

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