magi2 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +18 -0
  3. data/bin/magi2 +17 -0
  4. data/lib/magi2.rb +34 -0
  5. metadata +48 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: b51d22a5a6eb74cd29ae498590686039b42df4f93f716562bda0220fa7ae500e
4
+ data.tar.gz: 198d78bae061e01c3ab4c1ab4f2ccab899b8f9816ec451a85db55232ac0f34ea
5
+ SHA512:
6
+ metadata.gz: 780cd40c6f2ae4b81cecc2240e874a794afdbe2700ab5fd9da11228f835431dd62a7de6bd3db157b87e85f1428ccea0df0b885f96dd69f23cc33e5809819ad14
7
+ data.tar.gz: 68bec710226c327930d3dfc66e4448e6ae7cf3e349912032b3fd8758c337523bc3460dba486ec0a7fa9ede6df1e6a40edcd993109e26581a821dd2a8594d8fd1
data/README.md ADDED
@@ -0,0 +1,18 @@
1
+ # magi2
2
+
3
+ A small command line helper for [Magi 2](https://magi2-ai.com/), a browser-based
4
+ AI video generator that turns text prompts and images into short clips with sound.
5
+
6
+ ## Install
7
+
8
+ gem install magi2
9
+
10
+ ## Use
11
+
12
+ magi2 open # open the Magi 2 web app
13
+ magi2 info # print short prompt and review tips
14
+
15
+ ## Links
16
+
17
+ - Web app: https://magi2-ai.com/
18
+ - Homepage: https://magi2-ai.com/
data/bin/magi2 ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "magi2"
5
+
6
+ command = ARGV.first || "info"
7
+
8
+ case command
9
+ when "open"
10
+ puts "Opening #{Magi2.open}"
11
+ when "info", "help", "-h", "--help"
12
+ puts Magi2.info
13
+ else
14
+ puts "Unknown command: #{command}"
15
+ puts "Usage: magi2 [open|info]"
16
+ exit 1
17
+ end
data/lib/magi2.rb ADDED
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Magi 2 is a browser-based AI video generator that turns text prompts and
4
+ # images into short clips with sound. This gem is a small command line helper:
5
+ # it opens the Magi 2 web app and prints quick usage notes for a new session.
6
+ module Magi2
7
+ VERSION = "0.1.0"
8
+ BASE_URL = "https://magi2-ai.com/"
9
+
10
+ TIPS = [
11
+ "Describe one scene: subject, action, camera movement and mood.",
12
+ "Add a reference image if you want to keep an existing composition.",
13
+ "Write the sound separately, for example: a cup taps the saucer, rain stays soft.",
14
+ "Review the clip from start to finish before generating another version."
15
+ ].freeze
16
+
17
+ module_function
18
+
19
+ def open
20
+ case RbConfig::CONFIG["host_os"]
21
+ when /darwin/ then system("open", BASE_URL)
22
+ when /linux/ then system("xdg-open", BASE_URL)
23
+ when /mswin|mingw/ then system("start", BASE_URL)
24
+ else puts BASE_URL
25
+ end
26
+ BASE_URL
27
+ end
28
+
29
+ def info
30
+ lines = ["Magi 2 - text and image to video with sound", "Web app: #{BASE_URL}", "", "Tips:"]
31
+ TIPS.each_with_index { |tip, i| lines << " #{i + 1}. #{tip}" }
32
+ lines.join("\n")
33
+ end
34
+ end
metadata ADDED
@@ -0,0 +1,48 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: magi2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Andy Wang
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2026-11-29 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Opens the Magi 2 browser app and prints short prompt and review tips
14
+ for text-to-video and image-to-video work.
15
+ email:
16
+ - andywang201212@gmail.com
17
+ executables:
18
+ - magi2
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - README.md
23
+ - bin/magi2
24
+ - lib/magi2.rb
25
+ homepage: https://magi2-ai.com/
26
+ licenses:
27
+ - MIT
28
+ metadata: {}
29
+ post_install_message:
30
+ rdoc_options: []
31
+ require_paths:
32
+ - lib
33
+ required_ruby_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: 2.6.0
38
+ required_rubygems_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ requirements: []
44
+ rubygems_version: 3.0.3.1
45
+ signing_key:
46
+ specification_version: 4
47
+ summary: Command line helper for the Magi 2 AI video generator
48
+ test_files: []