A ruyi (Chinese: 如意; lit. 'as desired', 'as [you] wish') is a Chinese curved decorative object that serves as either a ceremonial scepter in Chinese Buddhism or a talisman symbolizing power and good fortune in Chinese folklore. The "ruyi" image frequently appears as a motif in Asian art.
 A traditional ruyi has a long S-shaped handle and a head fashioned like a fist, cloud, or lingzhi mushroom. Ruyi are constructed from diverse materials. For example, the Palace Museum in Beijing has nearly 3,000 ruyi  variously made of gold, silver, iron, bamboo, wood, ivory, coral, rhinoceros horn, lacquer, crystal, jade, and precious gems.
 The Chinese term ruyi is a compound of ru 如 "as; like; such as; as if; for example; supposing; be like; be similar; accord with" and yi 意 "wish; will; desire; intention; suggestion; thought; idea; meaning; imagination".
 Standard Chinese uses ruyi either as a stative verb meaning "as desired; as one wishes, as one likes; according to one's wishes; following your heart's desires", or as an adjective meaning "satisfied, pleased, happy, comfortable". The word is combined with suanpan 算盤 "abacus" in the expression ruyi suanpan to mean considering things only from a positive perspective; to be overly optimistic in one's plans.
 Chinese ruyi was borrowed as a Buddhist loanword into other East Asian languages such as Japanese and Korean with corresponding Sino-Xenic pronunciations.
 Chinese classic texts from the Former Han dynasty (206 BC – 24 AD) contain the earliest usages of the word ruyi. For example, the Shiji history uses it both literally for "as desired" and for the given name of Liu Ruyi 劉如意 (d. 195 BC), who was the son of Emperor Gaozu of Han and Concubine Qi. The Hanshu biography of the fangshi astrologer and mathematician Jing Fang (78–37 BCE) quotes him using ruyi meaning "as you wish" in an audience with Emperor Yuan of Han (tr. Edkins 1904: 238), "I fear that though your Majesty acts in this way you will still not obtain what accords with your wish."
 The anthropologist Berthold Laufer (1912:336) said that the Chinese accounts of the ruyi are "more unsatisfactory" than for any other object in Chinese culture. Scholars have proposed two basic theories for the origin of the ruyi, writes Kieschnick (2003:141). The former is that ruyi originated from Sanskrit anuruddha "a ceremonial scepter" used by Buddhist monks in India, who later brought it to China, transliterated as analu 阿那律 or translated as ruyi. The latter theory is that ruyi originated as a backscratcher in early China, and was amalgamated with the Buddhist symbol of authority. Davidson (1950:239) suggests "as desired" signifies a backscratcher owing to "its apparent ability to reach otherwise inaccessible areas of the human body".
 During the Later Han dynasty (25–220 AD) and Jin dynasty (266–420 AD), literati and nobles often held ruyi during conversations and other social occasions. It was called a tanbing 談柄 "conversation baton" (cf. the Native American talking stick) and was used much like the zhuwei 麈尾 "deer tail" (analogous to a fly whisk), which practitioners of the qingtan 淸談 "pure conversation" movement popularized during the Six Dynasties period (220–589 AD). Besides the ruyi, other objects used as a tanbing "discussion stick" included the tanshan 談扇 "discussion fan" and tanzhu 談麈 made from the tail of a Père David's deer. Davidson (1950:247) says "there seems no doubt that the primary and original function of the ju-i was that of a scepter qualifying the holder to "take the floor." Its origin was probably in India where the branch of a tree seems to have served a similar function. Any other purposes the ju-i served, such as a note tablet, honorific insignia, good luck gift, or even backscratcher, were merely later accruals."
 The ca. 554 AD Weishu history records a story that when Emperor Xiaowen of Northern Wei (r. 471–499 AD) wanted to retire from the throne, he tested his sons by letting them choose among a number objects, and the one who selected a bone ruyi (symbolizing political rule) became Emperor Xuanwu of Northern Wei (r. 500–515). Kieschnick (2003:144) concludes "that by the end of the sixth century, not only was the ruyi common at court, but it had even begun to take on emblematic significance as the mark of a ruler." Although the ruyi symbolized imperial political power, it differed from the Western royal scepter because Chinese officials and monks commonly used it.
 In Buddhist usage, holding a ruyi when teaching gave the holder the right to talk. The biography of Tiantai Buddhist patriarch Zhiyi (538–597) says that when he was teaching Prajna in place of his teacher Huisi 慧思 (515–577), Huisi would sit holding a ruyi in his hand (Davidson 1950:244).
 The (c. 886) Duyang zabian 杜陽雜編, which is a collection of Tang dynasty (618–907) stories, records that Emperor Wenzong presented an ivory ruyi to his tutor Li Xun 李訓 (d. 835) and said (tr. Kieschnick 2003:145), "The ruyi may serve you as a lecture baton (tanbing)." The (945) Old Book of Tang biography of Li Xun (tr. Davidson 1950:247) says this occurred on a hot summer day and the emperor's ruyi present was made from "heat-repelling rhinoceros horn", which is believed to be cooling in traditional Chinese medicine. Ruyi were both emblems of power and tools of discourse.
 Herbert Giles (1912:185) quoted the Song dynasty archaeologist Zhao Xigu 趙希鵠 (d. 1240) that the ruyi "was originally made of iron, and was used 'for pointing the way' and also 'for guarding against the unexpected,' i.e. for self-defence. It was, in fact, a kind of blunt sword, and traces of basket-work are still to be found inside what must have been the sword-guard."
 In the Ming dynasty (1368–1644 AD), ruyi became popular as ornaments or gifts symbolizing blessings and good luck. The ca. 1627 AD Zhangwuzhi 長物志 "Treatise on Superfluous Things", by Ming painter Wen Zhenheng, discussed ruyi aesthetics.
 The ruyi was used in ancient times to give directions or to protect oneself from the unexpected. It was for this reason that it was made or iron, and not on the basis of strictly aesthetic considerations. If you can obtain an old iron ruyi inlaid with gold and silver that sparkle now and then, and if it has an ancient dull color, this is the best. As for ruyi made of natural branches or from bamboo and so on, these are all worthless. (tr. Kieschnick 2003:151)  During the Qing dynasty (1644–1912 AD), ruyi scepters became luxuriant symbols of political power that were regularly used in imperial ceremonies, and were highly valued as gifts to and from the Emperor of China. Since 3 and 9 are considered lucky numbers in Chinese culture, Qing craftsmen elaborated the traditional handle and head type ruyi into two-headed sanjiang-ruyi 三鑲如意 "3-inlay ruyi" with precious stones set in both heads and middle of the handle and jiujiu-ruyi 九九如意 "9-9 ruyi" presentational sets of nine. The Qianlong Emperor presented a ruyi to the British ambassador George Macartney in 1793, and in his description (quoted by Kieschnick 2003:139–140), "It is a whitish, agate-looking stone, about a foot and a half long, curiously carved, and highly prized by the Chinese, but to me it does not appear in itself to be of any great value."
 During the historical evolution of Chinese ruyi "as desired", they have been used as backscratchers, ritual objects in Buddhism and later Daoism, pointers for public speakers, prized icons of political power and wealth, and auspicious gifts expressing best wishes.
 In Chinese art, ruyi scepters often appear as attributes of Buddhist saints and Daoist xian. The god of prosperity Cai Shen 財神 is often depicted holding a ruyi. Stylized repetitions of the shape are incorporated as a motif in the depiction of heavenly clouds. Ruyi symbolize achieving prosperity in fengshui practice. The ruyi shape appears as a motif in decorative knots, Oriental rug patterns, folk artifacts, and even modern corporate logos. Stylized ruyi often function as a kind of ante-fixae or palmette in traditional and modern architecture.
 Two types of ruyi are seen in Chinese Buddhist art. The early ruyi was common in Buddhist sculpture and painting from the late Six dynasties (220–589) through the Tang dynasty (618–906). It was a slender stick, varying from about 15 to 24 inches, which widened and curved slightly at one end. Not only were these utensils frequently portrayed by artists and sculptors, but the Shōsōin treasure house of Tōdai-ji temple, in Nara, has preserved several 8th-century ruyi (Davidson 1950:242). The modern ruyi, which first appeared in the art of the Song dynasty (960–1279) has two forms. The first type shows minor elaborations upon the basic slender-handled structure of the early ruyi, but the slight curve at the top was exaggerated into a decorative ornament, a medallion-like form, frequently a stylized fungus. The second type of contemporary ruyi shows a radical change, in addition to the decorated end, two other smaller inlaid plaques or medallions, with one at the middle of the handle and the other at the base. Variations occur where the center medallion becomes a rectangle, or the second is omitted (Davidson 1950:242–243).
 In early Chinese and Japanese Buddhist art, the bodhisattva Manjusri is usually depicted holding a sword (representing wisdom that cuts through ignorance), except in representations of his Vimalakirti Sutra discussion with the layman Vimalakirti, when Manjusri holds a ruyi scepter (Davidson 1950:240). This representation expanded in the 10th century, concurrent with the change in ruyi forms, and holding a ruyi became an attribute of other divinities as well as Chinese emperors (Davidson 1950:244).
 Berthold Laufer (1912: 339) believed the first Chinese representation of a ruyi was in an 8th-century Mañjuśrī painting by Wu Daozi, which showed it held in his right hand taking the place of the usual sword. Laufer noted the artistic similarly between the curved handle of a ruyi and the long stem of a lotus blossom, which was frequently depicted in the hands of Bodhisattvas, e.g., the Longmen Grottoes.
 I do not mean to say that the Buddhist emblem called Ju-i has developed from the lotus, though I think that the alternation of both is suggestive. But it is not necessary at all to assume that the Chinese Ju-i in general is of Buddhist origin... It may very well be that the implement is Chinese in origin and even prebuddhistic, and that, as in so many other things, a kind of compromise took place, resulting in the assimilation and amalgamation of two ideas and two forms. (1912:339)  Admitting that the "original significance of this implement has been lost long ago", Laufer hypothesized that the ruyi may have developed from a ritual jade that began as a Zhou dynasty "symbol of light, generative power and fertility".
 Two of the emperors in the famous Thirteen Emperors Scroll by Yan Liben (d. 673) are holding ruyi (Davidson 1950:247), Emperor Wen of Chen (r. 559–566) and Emperor Xuan of Chen (r. 569–582).
 Japanese painters variously pictured Manjusri holding a ruyi in either hand (Laufer 1912:338).  Sesshū Tōyō (1420–1506) showed one in his left hand and nothing in his right. Kichizan Minchō 吉山明兆 (1352–1431) and Kanō Sanraku (1559–1635) showed the Bodhisattva with a ruyi in his right and a book-roll in his left. A 12th-century Manjusri painting attributed to the Kose School a sword in his right and a sacred lotus-flower in his left hand.
 With the introduction of Buddhism to China, scholars used Chinese ruyi 如意 to translate various Sanskrit terms, which Buddhism in Japan subsequently borrowed as nyoi. The primary terms and Chinese/Japanese translations are:
 First, the anuruddha/ruyi/nyoi scepter is defined in the Digital Dictionary of Buddhism:
 An instrument held, especially by the abbot of a temple, during ceremonies and sermons shaped as a short staff curled in an S-shape and made out of wood, or more precious materials, such as ivory. One end is broader than the other, and often has a metal plate with a decorative cloud-shaped stamp. It is said to originally have been a back-scratcher that was carried by Buddhist monks. In some schools of Zen like Sanbo Kyodan, the ceremonial scepter of a rōshi is called kotsu bone, relic (骨, kotsu) instead of nyoi.
 The scepter has a slight S-shaped curve, like a human spinal column. The rōshi uses the kotsu, for example, to emphasize a point in a teishō, to lean on when sitting, or also occasionally to strike a student. (Diener, Erhard, and Fischer-Schreiber 1991:119)  Second, the divine kalpavriksha/ruyishu/nyoiju is a wishing tree in Hindu mythology. The Buddhist translator Samuel Beal (1884:105) explained it denotes "power to produce whatever was wished". The Chinese Buddhist monk Yi Jing 義凈, who travelled in India from 673 to 695, translated kalpavriksha as ruyishu in describing the Uposatha day celebration (tr. Takakusu 1896:49), "Then gifts are distributed. Sometimes the host provides a 'wishing tree' (Kalpa-vriksha), and gives it to the priests". Since it is unlikely that a real tree could have been given, Davidson (1950:247) notes that "some sort of symbolic tree was deemed appropriate as a gift to a Buddhist priest."
 Third, the legendary cintamani "wish-fulfilling jewel; jewel that grants all desires" is translated either with zhu/shu 珠 "pearl; bead" or baozhu/hōju 寶珠 "precious pearl; jewel". This famous term is frequently used in literature and art. The Digital Dictionary of Buddhism explains:
 A maṇi-jewel; magical jewel, which manifests whatever one wishes for (Skt. maṇi, cintā-maṇi, cintāmaṇi-ratna). According to one's desires, treasures, clothing and food can be manifested, while sickness and suffering can be removed, water can be purified, etc. It is a metaphor for the teachings and virtues of the Buddha. … Said to be obtained from the dragon-king of the sea, or the head of the great fish, Makara, or the relics of a Buddha. Erik Zürcher (1997:407) suggests that association between ruyi and the legendary ruyibao "wish-fulfilling gem" explains the dichotomy between it being both a mundane backscratcher and a Buddhist symbol.
 The ca. 1150 AD Fusō ryakki 扶桑略記 "Brief History of Fusang" by Kōen 皇圓, the teacher of Hōnen, recounts a Japanese nyoi-hōju legend involving the monk Foshi 佛誓 "Buddha's Vow" (Japanese Bussei).
 There lived in Northern India a Buddhist abbot, "Buddha's vow" by name, who for the sake of mankind sought the "Precious pearl which grants all desires". He went on board a ship and, when in the midst of the sea, by Buddha's power called up the Dragon-king. After having bound him by means of mystic formulae (tantras), he required the pearl from him, whereupon the dragon, unable to escape, took the pearl from his head and prepared to hand it over to the priest. The latter stretched out his left hand, at the same time making the "sword-sign"', a mudrā (mystic finger-twisting), with his right hand. The Dragon-king, however, said: "In former times, when the Dragon-king Sāgara's daughter gave a precious pearl to Cākyamuni, the latter received it with folded hands; why should a pupil of the Buddha accept it with one hand?" Then the priest folded his hands, giving up the mudrā, and was about to take the pearl, when the Dragon-king, no longer suppressed by the mystic sign, freed himself from his bands and ascended to the sky, leaving the abbot behind with empty hands, and destroying his boat. The only man who was saved was the priest himself. Afterwards the same abbot met Bodhidharma, the patriarch, who came across the sea from Southern India (in 526), and together they went to Japan. (tr. de Visser 1913:189)  Two additional Sino-Japanese Buddhist translations are:
 In addition to its use in Buddhist terminology, the Chinese word has other meanings. Ruyi can be a proper noun.
 Besides Prince Liu Ruyi (above), Ruyi is used in other personal names.
 Ruyi can also be a place name.
 In modern Japanese usage, the loanword nyoi 如意 "as desired; as [one] wishes" means "ease; comfort; freedom" or "(Buddhist) priest's staff".
 A few Buddhist temples in Japan are named with Nyoi.
 Besides temples, some other proper names include