Skip to content

API Reference

Complete reference for all public symbols exported from pyclifer.

All symbols are importable directly from the top-level package:

from pyclifer import app_group, BaseContext, BaseInterface, BaseModel, Response, get_logger

Never import from pyclifer.core.* — those paths are internal and may change.


Module map

pyclifer
├── Decorators       @app_group  @group  @command  @option  + helpers
├── Context          BaseContext  (subclass + make_pass_decorator)
├── Interfaces       BaseInterface  →  respond()
├── Output           Response  OperationResult  PaginatedResponse  ExitCode
│   └── Renderers    BaseRenderer  ResponseRenderer
│   └── Tables       CliTable  CliTableColumn  ExceptionTable
├── Models           BaseModel
├── Logging          get_logger  SecretsMasker  TRACE  …
├── Core Classes     PycliferOption  PycliferGroup  CustomConfigOption  (advanced)
└── Mixins           GlobalOptionsMixin  HandleResponseMixin  …  (advanced)

Where to start

I want to… Go to
Build a CLI from scratch Decorators
Add project-specific state to commands Context
Implement the service layer Interfaces
Control command output formats Output & Response
Model domain objects with validation Models
Configure logging Logging
Subclass Click internals Core Classes
Compose custom group/context classes Mixins

Typical import surface

Most projects only need these symbols day-to-day:

# Decorators
from pyclifer import app_group, group, command, option

# Context
from pyclifer import BaseContext, make_pass_decorator

# Service layer
from pyclifer import BaseInterface, BaseRenderer, ResponseRenderer

# Output
from pyclifer import Response, OperationResult, PaginatedResponse, ExitCode

# Domain models
from pyclifer import BaseModel

# Logging
from pyclifer import get_logger

Everything else (PycliferGroup, GlobalOptionsMixin, RichHelpersMixin, …) is available for advanced use cases — subclassing, custom group behavior, or extending the framework.