Commit Graph

51 Commits

Author SHA1 Message Date
Tristan Ancelet f55cc25f2d Modified Command.argument to let the user provide a method call for runtime learning of options value. This will let the compiler check at compile time 2026-08-14 14:10:25 -05:00
Tristan Ancelet b05f49c2e8 Fixed something maybe 2026-08-14 14:00:31 -05:00
Tristan Ancelet d3ca70ea9e Added options for array checking of base types Strings/Int32/etc 2026-08-14 13:55:10 -05:00
Tristan Ancelet 697a0db3af Added debug message to print out a missing match + the format being matched 2026-08-12 16:34:16 -05:00
Tristan Ancelet a1a9c6fc04 Added format filter to enforce formatting on array objects 2026-08-12 16:26:35 -05:00
Tristan Ancelet ffde5165f7 Added format support for filtering arguments 2026-08-12 16:12:59 -05:00
Tristan Ancelet 53f510278c added thing 2026-08-12 13:12:09 -05:00
Tristan Ancelet e6d9306e69 Added exit & default to help if no main is specified 2026-08-12 13:10:30 -05:00
Tristan Ancelet 18c5a559b1 Added exit & default to help if no main is specified 2026-08-12 13:08:24 -05:00
Tristan Ancelet 28c45fae9e Added guard for empty @flags array in template 2026-08-12 13:01:41 -05:00
Tristan Ancelet f889aae5e1 added dynamic resizing of description for flag & the like 2026-08-12 12:56:59 -05:00
Tristan Ancelet e90d89689c Increased default spacing in commands and flags 2026-08-12 12:50:42 -05:00
Tristan Ancelet 9b3d823bc7 Comitting for testing 2026-08-12 12:43:44 -05:00
Tristan Ancelet d02eded273 Trying again 2026-08-12 12:40:08 -05:00
Tristan Ancelet fc592fee37 Trying again 2026-08-12 12:38:55 -05:00
Tristan Ancelet 47b4bfa494 had to fix syntax 2026-08-12 12:37:28 -05:00
Tristan Ancelet 1a2da86048 Allowed delim in macros 2026-08-12 12:36:23 -05:00
Tristan Ancelet 37c5083ae2 added def_init 2026-08-12 11:59:49 -05:00
Tristan Ancelet 976ed10f75 Added def_getter 2026-08-12 11:00:56 -05:00
Tristan Ancelet ea8ca62a63 Added StringIterpolation 2026-08-12 10:55:22 -05:00
Tristan Ancelet 0c7849dc7c Added options 2026-08-11 12:24:30 -05:00
Tristan Ancelet 47df89a6c1 Had to fix the selection macro. Was part of the way throught and skipped finishing it 2026-08-11 11:58:04 -05:00
Tristan Ancelet afd7ba7c7b Added options to Command.argument macro 2026-08-11 11:53:38 -05:00
Tristan Ancelet 8447a1ffbb Added prerun command annotation & implementation 2026-08-11 11:37:22 -05:00
Tristan Ancelet 4af08f8efe had to fix again 2026-08-11 11:24:22 -05:00
Tristan Ancelet 1085335c88 Had to add for lib setup 2026-08-11 11:22:02 -05:00
Tristan Ancelet 19ea00ef72 added a few things 2026-08-11 11:17:34 -05:00
tristan 8d17de7434 Fix annotation key mismatch: validate -> validation in generate.cr
anno[:validate] was always nil; validation procs were never wired
into Flag(T).new. Correct key is :validation to match the field
name set by the argument macro in command/argument.cr.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ATnpoEGXj4RyuMoBLGWcjs
2026-08-10 13:12:12 -05:00
Tristan Ancelet 405303e4f8 updated .gitignor 2026-08-10 13:00:23 -05:00
Tristan Ancelet 29327a3e83 Got Array(T) working in flag.cr. Hacky stuff it is to convince the compiler that a value isn't going to be nil if I set it 2026-08-10 12:57:31 -05:00
tristan ac5711c0df Update .claude/settings.json with project permission allowlist
Allows crystal build/spec/run, shards, git read/write, and ls
without per-call prompts — consistent across machines.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ATnpoEGXj4RyuMoBLGWcjs
2026-08-10 08:02:58 -05:00
tristan 519c8dcd44 Remove test binary and test.cr
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ATnpoEGXj4RyuMoBLGWcjs
2026-08-10 07:59:02 -05:00
tristan bc0f56fda9 Add .claude/, .gitignore, and update README
- .claude/settings.json: project-level Claude Code config
- .gitignore: ignores test binary, build artifacts, shards cache, tags
- README.md: expanded with usage example, dev commands, and AI assistance
  disclosure (Claude used for review/bug-checking, not code generation)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ATnpoEGXj4RyuMoBLGWcjs
2026-08-10 07:58:15 -05:00
tristan 6f31a5d27c object_rework: working MVP with runtime CommandNode tree
- BaseCommandNode (abstract) / CommandNode(T) split for heterogeneous tree
- Flag(T) with compile-time type branching, Parsable/Coercable modules
- Arg double-process invariant enforcement
- App.generate macro builds CommandNode tree from Command subclasses
- Command#initialize generated via macro finished, populates ivars from handler
- Reserved -h/--help enforcement in Flag#check!
- MatchType::Help added, SubCommand dispatch fixed
- design.adoc: added Planned Features (markdown docs, bash completion)
- Makefile: tabs, .DEFAULT_GOAL, doc_show target

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-09 22:49:55 -05:00
tristan f5571cde73 Committing before test 2026-08-09 15:20:06 -05:00
Tristan Ancelet 3217750714 Added README changes to show install steps 2026-03-31 10:27:52 -05:00
Tristan Ancelet 613e059fb7 forgot to change one 2026-03-31 09:20:53 -05:00
Tristan Ancelet 771934b486 Changed structure 2026-03-31 09:17:36 -05:00
Tristan Ancelet 37ea36cfdd Pushing changes 2026-03-20 19:01:33 -05:00
Tristan Ancelet 3775096cc3 had to add thing 2026-03-11 13:39:14 -05:00
Tristan Ancelet 71e10f10ea Testing 2026-02-23 16:19:31 -06:00
Tristan Ancelet 19424b5c44 had to fix another thing 2026-02-23 15:41:36 -06:00
Tristan Ancelet 4073706c45 Forgot to add some things 2026-02-23 15:40:19 -06:00
Tristan Ancelet 21a2b0d972 Doing test 2026-02-23 15:22:13 -06:00
Tristan Ancelet 5a14063e1f Testing 2026-02-23 13:19:08 -06:00
Tristan Ancelet a29a65ceae Testing 2026-02-23 13:18:39 -06:00
Tristan Ancelet 49f175e9c6 Testing again 2026-02-23 13:16:17 -06:00
Tristan Ancelet fd3b9460e7 testing 2026-02-23 13:14:38 -06:00
Tristan Ancelet 136298e67c Changing to cligen 2026-02-23 13:09:33 -06:00
Tristan Ancelet 9b50633c0e Testing 2026-02-23 12:58:15 -06:00