This commit introduces the `Enchantrix` library to add support for the `.trix` encrypted file format. The main changes are: - The `matrix` format has been renamed to `tim` (Terminal Isolation Matrix). - The `.tim` format is now a specialized `.trix` file. - A new `decode` command has been added to decode `.trix` and `.tim` files. - The `collect` commands now support the `trix` and `tim` formats. - A `--password` flag has been added to the `collect` commands for encryption. - A `--i-am-in-isolation` flag has been added to the `decode` command for safely decoding `.tim` files. - The decryption functionality is currently disabled due to a bug in the `Enchantrix` library. A follow-up PR will be created to re-enable it.
27 lines
465 B
Go
27 lines
465 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/Snider/Borg/pkg/tim"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var runCmd = NewRunCmd()
|
|
|
|
func NewRunCmd() *cobra.Command {
|
|
return &cobra.Command{
|
|
Use: "run [tim file]",
|
|
Short: "Run a Terminal Isolation Matrix.",
|
|
Args: cobra.ExactArgs(1),
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
return tim.Run(args[0])
|
|
},
|
|
}
|
|
}
|
|
|
|
func GetRunCmd() *cobra.Command {
|
|
return runCmd
|
|
}
|
|
|
|
func init() {
|
|
RootCmd.AddCommand(GetRunCmd())
|
|
}
|