Documentation
¶
Index ¶
- func Execute(args []string) (err error)
- func ExitCode(err error) int
- func IsStdin(arg string) bool
- func ProfileFrom(ctx context.Context) string
- func ReadStdinIDs(arg string) ([]string, error)
- func ResolveAccountID(ctx context.Context, flagValue string) (string, error)
- func VersionString() string
- type AccountsCmd
- type AccountsGetCmd
- type AccountsListCmd
- type AccountsSyncCmd
- type AuthCmd
- type AuthLoginCmd
- type AuthLogoutCmd
- type AuthStatusCmd
- type CLI
- type CompletionCmd
- type ConfigCmd
- type ConfigGetCmd
- type ConfigSetCmd
- type ExitError
- type FinancialInstitutionsCmd
- type FinancialInstitutionsGetCmd
- type FinancialInstitutionsListCmd
- type OrganizationCmd
- type OrganizationShowCmd
- type PendingTransactionsCmd
- type PendingTransactionsListCmd
- type RootFlags
- type SyncCmd
- type SyncCreateCmd
- type SyncGetCmd
- type SyncListCmd
- type TransactionsCmd
- type TransactionsExportCmd
- type TransactionsGetCmd
- type TransactionsListCmd
- type VersionCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProfileFrom ¶
ProfileFrom retrieves the profile from the context (re-exported for convenience).
func ReadStdinIDs ¶
ReadStdinIDs reads IDs from stdin when "-" is provided. Returns nil if arg is not "-".
func ResolveAccountID ¶
ResolveAccountID resolves an account ID from flag, config, or auto-detection. Priority: flag > config > single account auto-detect.
func VersionString ¶
func VersionString() string
VersionString returns the version string for display.
Types ¶
type AccountsCmd ¶
type AccountsCmd struct {
List AccountsListCmd `cmd:"" help:"List all accounts"`
Get AccountsGetCmd `cmd:"" help:"Get account details"`
Sync AccountsSyncCmd `cmd:"" help:"Trigger account synchronization"`
}
AccountsCmd is the parent command for accounts.
type AccountsGetCmd ¶
type AccountsGetCmd struct {
ID string `arg:"" help:"Account ID (use - for stdin)"`
}
AccountsGetCmd gets account details.
type AccountsListCmd ¶
type AccountsListCmd struct {
Product string `help:"Filter by product type"`
}
AccountsListCmd lists accounts.
type AccountsSyncCmd ¶
type AccountsSyncCmd struct {
ID string `arg:"" help:"Account ID"`
Wait bool `help:"Wait for sync to complete"`
}
AccountsSyncCmd triggers synchronization.
type AuthCmd ¶
type AuthCmd struct {
Login AuthLoginCmd `cmd:"" help:"Store credentials in keyring"`
Logout AuthLogoutCmd `cmd:"" help:"Remove credentials from keyring"`
Status AuthStatusCmd `cmd:"" help:"Show authentication status"`
}
AuthCmd is the parent command for authentication.
type CLI ¶
type CLI struct {
RootFlags `embed:""`
Version kong.VersionFlag `help:"Print version and exit"`
VersionCmd VersionCmd `cmd:"" name:"version" help:"Print version"`
Auth AuthCmd `cmd:"" help:"Authentication commands"`
Accounts AccountsCmd `cmd:"" help:"Bank accounts"`
Transactions TransactionsCmd `cmd:"" help:"Account transactions"`
Sync SyncCmd `cmd:"" help:"Synchronization"`
Organization OrganizationCmd `cmd:"" help:"Organization info"`
PendingTransactions PendingTransactionsCmd `cmd:"" name:"pending-transactions" help:"Pending transactions"`
FinancialInstitutions FinancialInstitutionsCmd `cmd:"" name:"financial-institutions" help:"Financial institutions"`
Completion CompletionCmd `cmd:"" help:"Generate shell completions"`
Config ConfigCmd `cmd:"" help:"Configuration"`
}
CLI is the root command structure.
type CompletionCmd ¶
type CompletionCmd struct {
Shell string `arg:"" help:"Shell type (bash, zsh, fish, powershell)" enum:"bash,zsh,fish,powershell"`
}
CompletionCmd generates shell completions.
func (*CompletionCmd) Run ¶
func (c *CompletionCmd) Run() error
type ConfigCmd ¶
type ConfigCmd struct {
Get ConfigGetCmd `cmd:"" help:"Get configuration value"`
Set ConfigSetCmd `cmd:"" help:"Set configuration value"`
}
ConfigCmd is the parent command for configuration.
type ConfigGetCmd ¶
type ConfigGetCmd struct {
Key string `arg:"" help:"Config key (account-id)"`
}
ConfigGetCmd gets a configuration value.
type ConfigSetCmd ¶
type ConfigSetCmd struct {
Key string `arg:"" help:"Config key (account-id)"`
Value string `arg:"" help:"Value to set"`
}
ConfigSetCmd sets a configuration value.
type FinancialInstitutionsCmd ¶
type FinancialInstitutionsCmd struct {
List FinancialInstitutionsListCmd `cmd:"" help:"List financial institutions"`
Get FinancialInstitutionsGetCmd `cmd:"" help:"Get financial institution details"`
}
FinancialInstitutionsCmd is the parent command for financial institutions.
type FinancialInstitutionsGetCmd ¶
type FinancialInstitutionsGetCmd struct {
ID string `arg:"" help:"Financial institution ID"`
}
FinancialInstitutionsGetCmd gets financial institution details.
type FinancialInstitutionsListCmd ¶
type FinancialInstitutionsListCmd struct{}
FinancialInstitutionsListCmd lists financial institutions.
type OrganizationCmd ¶
type OrganizationCmd struct {
Show OrganizationShowCmd `cmd:"" help:"Show organization info"`
}
OrganizationCmd is the parent command for organization.
type PendingTransactionsCmd ¶
type PendingTransactionsCmd struct {
List PendingTransactionsListCmd `cmd:"" help:"List pending transactions"`
}
PendingTransactionsCmd is the parent command for pending transactions.
type PendingTransactionsListCmd ¶
type PendingTransactionsListCmd struct {
AccountID string `help:"Account ID (default: from config or auto-detect)" name:"account-id"`
}
PendingTransactionsListCmd lists pending transactions.
type RootFlags ¶
type RootFlags struct {
Profile string `help:"Profile name" default:"${profile}" env:"PONTO_PROFILE"`
Sandbox bool `help:"Use sandbox profile" default:"false"`
EnableCommands string `help:"Comma-separated list of enabled commands" default:"${enabled_commands}" env:"PONTO_ENABLE_COMMANDS"`
JSON bool `help:"Output JSON"`
CSV bool `help:"Output CSV"`
Plain bool `help:"Output TSV (stable for scripting)"`
Verbose int `short:"v" type:"counter" help:"Verbosity (-v, -vv)"`
Timeout time.Duration `help:"Request timeout" default:"30s"`
NoRetry bool `help:"Disable retry on errors"`
}
RootFlags contains global CLI flags.
type SyncCmd ¶
type SyncCmd struct {
Create SyncCreateCmd `cmd:"" help:"Create a new synchronization"`
Get SyncGetCmd `cmd:"" help:"Get synchronization status"`
List SyncListCmd `cmd:"" help:"List synchronizations"`
}
SyncCmd is the parent command for synchronization.
type SyncCreateCmd ¶
type SyncCreateCmd struct {
AccountID string `help:"Account ID (default: from config or auto-detect)" name:"account-id"`
Subtype string `required:"" help:"Sync subtype (accountDetails, accountTransactions)" enum:"accountDetails,accountTransactions"`
Wait bool `help:"Wait for sync to complete"`
}
SyncCreateCmd creates a sync.
type SyncGetCmd ¶
type SyncGetCmd struct {
ID string `arg:"" help:"Synchronization ID"`
}
SyncGetCmd gets sync status.
type SyncListCmd ¶
type SyncListCmd struct {
AccountID string `help:"Account ID (default: from config or auto-detect)" name:"account-id"`
Limit int `help:"Maximum number of syncs" default:"10"`
}
SyncListCmd lists syncs.
type TransactionsCmd ¶
type TransactionsCmd struct {
List TransactionsListCmd `cmd:"" help:"List transactions"`
Get TransactionsGetCmd `cmd:"" help:"Get transaction details"`
Export TransactionsExportCmd `cmd:"" help:"Export transactions"`
}
TransactionsCmd is the parent command for transactions.
type TransactionsExportCmd ¶
type TransactionsExportCmd struct {
AccountID string `help:"Account ID (default: from config or auto-detect)" name:"account-id"`
Since string `help:"Start date (ISO 8601 or relative like -30d)"`
Until string `help:"End date (ISO 8601 or relative like -1d)"`
Format string `help:"Output format (csv, json)" default:"csv" enum:"csv,json"`
Type string `help:"Filter by type: income, expense, or all" enum:"income,expense,all" default:"all"`
}
TransactionsExportCmd exports transactions.
type TransactionsGetCmd ¶
type TransactionsGetCmd struct {
AccountID string `help:"Account ID (default: from config or auto-detect)" name:"account-id"`
ID string `arg:"" help:"Transaction ID (use - for stdin)"`
}
TransactionsGetCmd gets transaction details.
type TransactionsListCmd ¶
type TransactionsListCmd struct {
AccountID string `help:"Account ID (default: from config or auto-detect)" name:"account-id"`
Since string `help:"Start date (ISO 8601 or relative like -30d)"`
Until string `help:"End date (ISO 8601 or relative like -1d)"`
Limit int `help:"Maximum number of transactions" default:"100"`
Type string `help:"Filter by type: income, expense, or all" enum:"income,expense,all" default:"all"`
}
TransactionsListCmd lists transactions.
type VersionCmd ¶
type VersionCmd struct{}
VersionCmd prints version information.
func (*VersionCmd) Run ¶
func (c *VersionCmd) Run() error