example code
const std = @import("std");
const GeneralPurposeAllocator = std.heap.GeneralPurposeAllocator(.{});
const MyEnum = enum(i64) {
a = 1,
b = 2,
};
pub fn main() !void {
var alloc: GeneralPurposeAllocator = .{};
const args = try std.process.argsAlloc(alloc.allocator());
if (args.len < 2) {
std.debug.panic("require at least one argument", .{});
}
const value = try std.fmt.parseInt(i64, args[1], 10);
const enumval: MyEnum = @enumFromInt(value);
std.debug.print("{}", .{enumval});
}