GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ClaudeCodeApiConfigManager/Program.cs at master · morilong/ClaudeCodeApiConfigManager

Expand file tree

/

Program.cs

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
68 lines (59 loc) · 2.25 KB
/

Program.cs

Copy path

File metadata and controls

68 lines (59 loc) · 2.25 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
using System.CommandLine;
using System.Text;
using ClaudeCodeApiConfigManager.Commands;
using ClaudeCodeApiConfigManager.Services;
namespace ClaudeCodeApiConfigManager;
class Program
{
private static readonly IConsoleOutput Output = new ConsoleOutput();
static int Main(string[] args)
{
try
{
// 解决特殊字符乱码问题
Console.OutputEncoding = Encoding.UTF8;
// 检查是否请求显示版本
if (VersionHelper.IsVersionRequest(args))
{
VersionHelper.PrintVersion();
return 0;
}
var isInstallForce = string.Join(" ", args).Trim().Equals("install -y", StringComparison.OrdinalIgnoreCase) == true;
if (args.Length == 0 || isInstallForce)
{
// 运行初始化向导
var result = InitService.RunInitializeWizard(isInstallForce);
if (result != -1)
{
return result;
}
// 已安装,显示命令信息
if (args.Length == 0)
{
args = ["-h"];
}
}
var rootCommand = new RootCommand
{
Description = "一个跨平台的 Claude Code API 配置管理工具。"
};
// 添加版本选项
rootCommand.Options.Add(VersionHelper.CreateVersionOption());
// 添加子命令
rootCommand.Subcommands.Add(CommandBuilder.CreateAddCommand());
rootCommand.Subcommands.Add(CommandBuilder.CreateListCommand());
rootCommand.Subcommands.Add(CommandBuilder.CreateUseCommand());
rootCommand.Subcommands.Add(CommandBuilder.CreateCurrentCommand());
rootCommand.Subcommands.Add(CommandBuilder.CreateRemoveCommand());
rootCommand.Subcommands.Add(CommandBuilder.CreateSetTokenCommand());
rootCommand.Subcommands.Add(CommandBuilder.CreateUninstallCommand());
return rootCommand.Parse(args).Invoke();
}
catch (Exception ex)
{
Output.Error("发生错误:");
Output.Error(ex.ToString());
return 1;
}
}
}
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.