MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / main

Function main

atomic-cli/src/main.rs:802–910  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

800// Main Entry Point
801
802fn main() {
803 // Initialize logging
804 env_logger::init();
805
806 // Parse command-line arguments
807 let cli = Cli::parse();
808
809 // Configure color output
810 if cli.no_color {
811 // Disable colors globally
812 console::set_colors_enabled(false);
813 console::set_colors_enabled_stderr(false);
814 }
815
816 // Execute the command and handle errors
817 let result = match cli.command {
818 Commands::Agent(agent) => agent.run(),
819
820 Commands::Init(init) => init.run(),
821
822 Commands::Status(status) => status.run(),
823
824 Commands::Add(add) => add.run(),
825
826 Commands::Remove(remove) => remove.run(),
827
828 Commands::Move(mv) => mv.run(),
829
830 Commands::Restore(restore) => restore.run(),
831
832 Commands::Sandbox(sandbox) => sandbox.run(),
833
834 Commands::Split(split) => split.run(),
835
836 Commands::Record(record) => record.run(),
837
838 Commands::Revise(revise) => revise.run(),
839
840 Commands::Log(log) => log.run(),
841
842 Commands::Change(change) => change.run(),
843
844 Commands::Diff(diff) => diff.run(),
845
846 Commands::Doctor(doctor) => doctor.run(),
847
848 Commands::Git(git) => git.run(),
849
850 Commands::Insert(insert) => insert.run(),
851
852 Commands::View(view) => view.run(),
853
854 Commands::Stash(stash) => stash.run(),
855
856 Commands::Push(push) => push.run(),
857
858 Commands::Pull(pull) => pull.run(),
859

Callers

nothing calls this directly

Calls 5

parseFunction · 0.85
print_errorFunction · 0.85
runMethod · 0.45
suggestionMethod · 0.45
exit_codeMethod · 0.45

Tested by

no test coverage detected